import Vue from 'vue'
import Router from 'vue-router'
import Home from './view/Home'

Vue.use(Router)
const router =new Router({
    routes:[
        {
            path:'/',
            redirect:'index'
        },
        {
            path:'/',
            name:'home',
            component:Home,
            children:[
                {
                    path:'/index',
                    name:'index',
                    component:()=>import('./view/index/index'),
                    children:[
                        {
                            path:'/index',
                            name:'index',
                            component:()=>import('./components/index/NewsList')
                        },
                    ]
                },
                {
                    path:'/me',
                    name:'me',
                    component:()=>import('./view/me/My.vue'),
                },
                {
                    path:'/message',
                    name:'message',
                    component:()=>import('./view/message/Messageindex')
                },
                {
                    path:'/vip',
                    name:'vip',
                    component:()=>import('./view/vip/Vip')
                },
                {
                    path:'/Channel',
                    name:'find',
                    component:()=>import('./view/circle/Circle'),
                    children: [
                        {
                            path:'/partition',
                            name:'partition',
                            component:()=>import('./view/circle/Partition')
                        },
                        {
                            path:'/channel',
                            name:'channel',
                            component:()=>import('./view/circle/Channel')
                        },
                    ]
                },
            ]
        },
        {
            path:'/sign',
            name:'sign',
            component:()=>import('./view/login/sign')
        },
        {
            path:'/code',
            name:'code',
            component:()=>import('./view/login/code')
        },
        {
            path:'/tpsign',
            name:'tpsign',
            component:()=>import('./view/login/passLogin')
        },
        {
            path:'/indextext',
            name:'indextext',
            component:()=>import('./view/indexTexts/IndexTexts')
        },
        {
            path:'/homepage',
            name:'homepage',
            component:()=>import('./view/homepage/Homepage')
        },
        {
            path:'/buy',
            name:'buy',
            component:()=>import('./view/buy/Buy')
        },
        {
            path:'/buycar',
            name:'buycar',
            component:()=>import('./view/buy/BuyCar')
        },
        {
            path:'/share',
            name:'share',
            component: ()=>import('./view/share/share')
        },
        {
            path:'/futext',
            name:'futext',
            component: ()=>import('./view/futext/wandeidor')
        },
        {
            path:'/register',
            name:'register',
            component: ()=>import('./view/login/register')
        },
        {
            path:'/findindex',
            name:'findindex',
            component: ()=>import('./view/indexTexts/FindIndex')
        },
    ]
})
export default router

